package com.android.delivery.adapter.siji

import com.android.delivery.R
import com.android.delivery.entity.Transport
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

/**
 * @author: mqwang
 * @create: 2/26/21 4:13 PM
 * @Description:
 */
class SJOrderAdapter(var type:Int) : BaseQuickAdapter<Transport, BaseViewHolder>(R.layout.sj_adapter_order) {

    override fun convert(helper: BaseViewHolder?, item: Transport?) {
        if (type > 0){
            helper!!.setGone(R.id.tv_left, false)
        }else{
            helper!!.setGone(R.id.tv_left, true)
        }

        helper!!.setText(R.id.tv_name, item!!.locationName)
        helper!!.setText(R.id.tv_phone, item!!.mobile)
        helper!!.setText(R.id.tv_num, item!!.quantity.toString() + "件")

        helper.addOnClickListener(R.id.tv_left)
    }
}